@use 'Variables.scss';

.hideNavigation #navigation li.showNavigation {
  width: 2.5em;
  border-top-right-radius: Variables.$radius;
  display: flex;
}

.disableAnimations.hideNavigation #navigation,
.disableAnimations #navigation {
  transition: none;
  li.showNavigation {
    transition: none;
  }
}

#navigation {
  width: 5em;
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  height: 100vh;
  background: Variables.$lighter-grey;
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease;
  list-style: none;
  padding: 0;
  margin: 0;
  li {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: none;
    cursor: pointer;
    &.break {
      margin-top: auto;
    }
    svg {
      color: Variables.$dark-grey;
    }
    &:active,
    &:hover,
    &.active {
      background: Variables.$light-grey;
    }
    &:focus-visible {
      background: Variables.$mid-grey;
      border-color: Variables.$mid-grey;
    }
    &.logo,
    &.logo:hover {
      font-weight: bold;
      cursor: auto;
      color: white;
      background: linear-gradient(0.33turn, #1b5551, #813e93);
    }
    &.showNavigation {
      position: fixed;
      bottom: 0;
      left: 0;
      display: none;
      background: Variables.$lighter-grey;
      color: Variables.$dark-grey;
      z-index: 10;
      transition: width 0.3s ease;
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      &:hover {
        width: inherit;
        display: inherit;
      }
    }    
  }
}

.compact {
  #navigation {
    width: 3em;
    li {
      svg {
        font-size: 1.25em;
      }
      &.logo {
        font-size: 0.8em;
      }
    }
  }
  #root {
   .flexContainer {    
     margin-left: 3em;
     &.hideNavigation {
       #navigation {
         left: -3em;
       }
     }   
   }
  }
  .hideNavigation #navigation li.showNavigation {
    width: 2em;
    &:hover {
      width: 3em;
    }
  }  
}

.dark {
  #navigation {
    background: Variables.$darker-grey;
    li {
      border-color: rgba(255, 255, 255, 0.05) !important;
      svg {
        color: Variables.$mid-grey;
      }
      &:hover:not(.logo),
      &:active:not(.logo),
      &:focus-visible,
      &.active {
        background: #3b3b3b;
      }
      &.showNavigation {
        background: Variables.$darker-grey;
        &:hover {
          background: inherit;  
        }
      }
    }
  }
}
